import http from '@/utils/http2.js'

/**
 * 保存采购单
 */
export function savePurchase(data){
    return http.post("/api/purchase/save",data)
}

/**
 * 查询采购单列表
 */
export function query(data){
    return http.post("/api/purchase/query",data)
}

/**
 * 导出采购单
 */
export function excel(data){
    return http.post("/api/purchase/export",data)
}

/**
 * 删除采购单
 */
export function deleteAll(data){
    return http.delete("/api/purchase/delete?list="+data)
}

/**
 * 批量审核采购单
 */
export function updateAll(data) { 
    return http.post("/api/purchase/updateStatus",data)
}

/**
 * 采购单详情
 */
export function getPurchase(data) {
    return http.get("/api/purchase/get?id="+data)
}

/**
 * 修改采购单
 */
export function updatePurchase(data) {
    return http.put("/api/purchase/update",data)
}